@extends('admin.layout.layout')
@section('title')
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.config.js')}}"></script>
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.all.min.js')}}"> </script>
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/lang/zh-cn/zh-cn.js')}}"></script>
    <title>北京仁爱慈善基金CMS管理系统 >> 志愿者手记内容修改</title>
@endsection
@section('con')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">志愿者手记内容修改</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
	<div class="panel panel-default">
        <div class="panel-heading">
           @if (count($errors) > 0)
			    <div class="alert alert-danger">
			        <ul>
			            @foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
			            @endforeach
			        </ul>
			    </div>
			@endif 
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-lg-6 col-lg-offset-3">
                    <form role="form" action="{{asset('/admin/notes/update')}}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label>志愿者手记主题</label>
                            <input class="form-control" type="text" name="title" value="{{$datas->title}}">
                        </div>
                        <div class="form-group">
                            <label>展示图</label>
                            <input type="file" name="pic">
                            <img src="{{asset($datas->pic)}}" alt="" width="150px" style="margin-left:180px;margin-top:-40px;">
                        </div>
                        <div class="form-group">
                            <label>原作者:</label>
                            <input class="form-control" type="text" name="author" value="{{$datas->author}}">
                        </div>
                        <div class="form-group">
                            <label>发布者:</label>
                            <input class="form-control" type="text" name="pauthor" value="{{$datas->pauthor}}">
                        </div>
                        <div class="form-group">
                            <label>手记内容:</label>
                            <script id="editor" type="text/plain" name="content" style="height:330px;">{!!$datas->content!!}</script>
                        </div>
                        <div class="form-group">
                            <label>显示状态:</label>
                            <select class="form-control" name="status">
                                <option value="0" @if($datas->status == 0) selected @endif>禁止</option>
                                <option value="1" @if($datas->status == 1) selected @endif>开启</option>
                            </select>
                        </div>
                        <input type="hidden" name="id" value="{{$datas->id}}">
						{{ csrf_field() }}
                        <button type="submit" class="btn btn-info">修改</button>
                        <button type="reset" class="btn btn-outline btn-warning">重置</button>
                    </form>
                </div>
                <!-- /.col-lg-6 (nested) -->
               
                <!-- /.col-lg-6 (nested) -->
            </div>
            <!-- /.row (nested) -->
        </div>
    </div>
@endsection
@section('js')
    <script>
        var ue = UE.getEditor('editor');
    </script>
@endsection